home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group99a.txt
/
000153_icon-group-sender _Tue Jul 13 12:31:56 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA10696
for icon-group-addresses; Tue, 13 Jul 1999 12:30:15 -0700 (MST)
Message-Id: <199907131930.MAA10696@baskerville.CS.Arizona.EDU>
Date: Tue, 13 Jul 1999 09:36:28 -0700 (MST)
From: Gregg Townsend <gmt@baskerville.CS.Arizona.EDU>
To: hgs@dmu.ac.uk
Cc: icon-group@optima.CS.Arizona.EDU
Subject: Re: checking for directory
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Date: Tue, 13 Jul 1999 12:18:39 +0100 (BST)
From: Hugh Sasse <hgs@dmu.ac.uk>
I cannot see a function which will allow one to determine if the list of
names one is reading is due to reading a genuine directory or a file
produced by 'ls -a > files'. There seems to be no stat or lstat function.
You can't tell by the file contents, but you can determine whether a
filename s is a directory by checking to see whether open(s || "/.")
succeeds. This is encapsulated in the directory(s) procedure in the
Icon program library ("link io"). There's no general stat()/lstat()
function, though.
---------------------------------------------------------------------------
Gregg Townsend Staff Scientist The University of Arizona
gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA